from basic_info. models import *
from rest_framework.serializers import Serializer,ModelSerializer,IntegerField,BooleanField
from rest_framework import serializers

class WarehouseSerializer(ModelSerializer):
    '''
    仓库反序列化器: 实现增删改
    '''


    class Meta:
        model=WarehouseModel
        fields='__all__'

class WarehouseSearchSerializer(ModelSerializer):
    '''
    仓库序列化器: 实现查询操作
    '''
    leader_user=serializers.SlugRelatedField(slug_field='real_name',read_only=True)

    class Meta:
        model=WarehouseModel
        fields='__all__'